import com.mytest.provider.ff.FfApplication;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Method;

/**
 * @Author: llq
 * @Date: 2020/4/13
 */
@RunWith(SpringRunner.class)
@SpringBootTest(classes = FfApplication.class)
public class test {

    @Test
    public void c() throws Exception{
        String a = "xxx";
        Class<? extends String> aClass = a.getClass();
        System.out.println("类"+aClass);

        Constructor<?>[] declaredConstructors = aClass.getDeclaredConstructors();
        System.out.println("构造级"+declaredConstructors);

//        aClass.getDeclaredConstructor(int.class).newInstance();
        Class[] b = {String.class};
//        Method[] declaredMethods = aClass.getDeclaredMethods("split",b);
//        declaredMethods.invoke(String,"xxx");

//        Field xxx = aClass.getDeclaredField("xxx");
//        xxx.set(aClass, "cc");

    }
}
